<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overlined Number</title>
<style>
  .overlined {
    position: relative;
    display: inline-block;
  }
  .overlined::before {
    content: '';
    position: absolute;
    top: 12px; /* 调整这个值以改变横线相对于数字的位置 */
    left: 0;
    right: 0;
    border-top: 1px solid black; /* 横线的样式 */
  }
</style>
</head>
<body>

<span class="overlined">100</span>
<script>
    window.onload=function(){
        let spanWidth = document.getElementsByClassName('overlined')[0];
        console.log('长度',spanWidth.style);
        
    }
</script>
</body>
</html>